{{#*inline "schemaPartial"}}
{{#each tables as |table|}}
{{#if comment}}

/** {{comment}} */
{{/if}}
export const {{interfaceName}}TableName = "{{name}}"
export interface {{interfaceName}}ForInsert {{#if extends}}extends {{extends}} {{/if}}{
  {{#each additionalProperties as |prop|}}
  {{prop}}
  {{/each}}
  {{#each columns}}
  {{#if comment}}

  /** {{comment}} */
  {{/if}}
  '{{propertyName}}'{{#if optional}}?{{/if}}: {{propertyType}}{{#if nullable}} | null{{/if}};
  {{/each}}
}
export type {{interfaceName}} = Required<{{interfaceName}}ForInsert>


{{/each}}
{{#each enums as |enum|}}
export enum {{convertedName}} {
{{#each values as |value|}}
  '{{value.convertedKey}}' = {{handleNumeric value.value}},
{{/each}}
}
{{/each}}
{{/inline}}
/*
* This file was generated by a tool.
* Rerun sql-ts to regenerate this file.
*/
type JsonString = string
{{#if config.schemaAsNamespace}}
{{#each database.schemas as |schema|}}
export namespace {{schema.name}} {
  {{> schemaPartial schema}}
}
{{/each}}
{{else}}
{{#each database.schemas as |schema|}}
{{> schemaPartial schema }}
{{/each}}
{{/if}}
